package com.jsnider.pokedex;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.content.Intent;

public class PokedexActivity extends Activity {
    Button btnViewPokemon;
    Button btnNewPokemon;
 
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_pokedex);
 
        // Buttons
        btnViewPokemon = (Button) findViewById(R.id.btnViewPokemon);
        btnNewPokemon = (Button) findViewById(R.id.btnCreatePokemon);
 
        // view products click event
        btnViewPokemon.setOnClickListener(new View.OnClickListener() {
 
            @Override
            public void onClick(View view) {
                // Launching All products Activity
                Intent i = new Intent(getApplicationContext(), AllPokemonActivity.class);
                startActivity(i);

            }
        });
 
        // view products click event
        btnNewPokemon.setOnClickListener(new View.OnClickListener() {
 
            @Override
            public void onClick(View view) {
                // Launching create new product activity
                Intent i = new Intent(getApplicationContext(), AddPokemon.class);
                startActivity(i);
 
            }
        });
    }
}
